﻿using NCRE学生考试端V1._0;
using System.Threading;
using System.Windows.Forms;
using System;

namespace UI
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
       {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            bool createNew;
            using (Mutex mutex = new Mutex(true, Application.ProductName, out createNew))
            {
                if (createNew)
                {
                    //Application.Run(new FrmTeacherLogin());//教师端
                    Application.Run(new FrmLogin());//学生端
                    //Application.Run(new frmAddStudent());
                }
                else
                {
                    MessageBox.Show("考试系统已经在运行中...");
                    Thread.Sleep(1000);
                    Environment.Exit(1);
                }
            }
        }
    }
}
